﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Net;
using System.IO;


namespace MiWebSite_Core
{
    public class Bitly
    {
        public static string Shortener(string URL, string userName, string APIKey)
        {
            string urlPeticion = "http://api.bitly.com/v3/shorten?format=txt&longUrl=" + URL + "&login=" + userName + "&apiKey=" + APIKey;
            string respues= GetUrl.FetchURL(urlPeticion);
            return respues;
        }

        public static string Shortener(string URL)
        {
            return Shortener(URL, "weblogsmexico", "R_8276ea45f27523dc526180d07e2a00fc");
        }

    }
}


